{% extends 'base.html' %}
{% load staticfiles %}

{% block content %}
    {% for post in post_list %}
                 <article class="post post-{{ forloop.counter }}">
                    <header class="entry-header">
                        <h1 class="entry-title">
                            <a href="{% url 'blog:post' post.id %}">{{ post.title }}</a>
                        </h1>
                        <div class="entry-meta">
                            <span class="post-category"><a href="#">{{ post.category.name }}</a></span>
                            <span class="post-date"><a href="#"><time class="entry-date"
                                                                      datetime="2012-11-09T23:15:57+00:00">2017年5月11日</time></a></span>
                            <span class="post-author"><a href="#">{{ post.author.username }}</a></span>
                            <span class="comments-link"><a href="#">4 评论</a></span>
                            <span class="views-count"><a href="#">588 阅读</a></span>
                        </div>
                    </header>
                    <div class="entry-content clearfix">
                        <p>{{ post.excerpt }}</p>
                        <div class="read-more cl-effect-14">
                            <a href="#" class="more-link">继续阅读 <span class="meta-nav">→</span></a>
                        </div>
                    </div>
                </article>
                {% endfor %}




                <!-- 简单分页效果
                <div class="pagination-simple">
                    <a href="#">上一页</a>
                    <span class="current">第 6 页 / 共 11 页</span>
                    <a href="#">下一页</a>
                </div>
                -->
                <div class="pagination">

{#                        <ul class="pagelist">#}
{#                            {% if post_list.has_previous %}#}
{#                                <li class="long"><a href="?{{ post_list.previous_page_number.querystring }}">上一页</a></li>#}
{#                            {% endif %}#}
{##}
{#                            {% for page in post_list.pages %}#}
{#                                {% if page %}#}
{#                                    {% ifequal page post_list.number %}#}
{#                                        <li class="active"><a href="?{{ page.querystring }}">{{ page }}</a></li>#}
{#                                    {% else %}#}
{#                                        <li><a href="?{{ page.querystring }}" class="page">{{ page }}</a></li>#}
{#                                    {% endifequal %}#}
{#                                {% else %}#}
{#                                    <li class="none"><a href="">...</a></li>#}
{#                                {% endif %}#}
{#                            {% endfor %}#}
{#                            {% if post_list.has_next %}#}
{#                                <li class="long"><a href="?{{ post_list.next_page_number.querystring }}">下一页</a></li>#}
{#                            {% endif %}#}
{#                        </ul>#}

                </div>
{% endblock %}

